<template>
	<view :style="{'height':containerHeight}" class="vsCardContainer bg-white flex">
		<view class="vs_status flex justify-center align-center">
			<text :style="{'color':textColor}">{{vsData.status}}</text>
		</view>
		<view class="vs_content flex justify-between align-center">
			<view class="vs_content_view">
				<view>{{vsData.nameOfShop}}</view>
				<view class="flex align-center">
					<text class="vsLoIco cuIcon-locationfill"></text>
					<text class="vsText">{{vsData.location}}</text>
				</view>
				<text v-if="vsData.vsFrom" class="vs_from">{{vsData.vsFrom}}</text>
			</view>
			<text class="vs_more cuIcon-right"></text>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			vsData:{
				default: Object
			}
		},
		data(){
			return {
				textColor: '#FF9800',
				containerHeight: '120rpx'
			}
		},
		created() {
			console.log(this.vsData)
			if(this.vsData.status == '已完成') {
				this.textColor = '#707070'
			}
			if(this.vsData.vsFrom){
				this.containerHeight = '164rpx'
			}
		}
	}
</script>

<style>
	.vsCardContainer{
		padding: 15rpx 0;
		padding-right: 25rpx;
		border-bottom: 1px solid #E5E5E5;
	}
	.vs_status{
		width: 120rpx;
	}
	
	.vs_status text {
		font-size: 28rpx;
	}
	.vs_content{
		flex: 1;
		border-left: 1rpx solid #FF9800;
	}
	.vs_content_view{
		padding: 5rpx 0;
		height: 100%;
		display: flex;
		margin-left: 24rpx;
		flex-direction: column;
		justify-content: space-between;
		color: #101010;
	}
	.vs_from {
		font-size: 24rpx;
		color: #5275AB;
	}
	.vsLoIco{
		font-size: 28rpx;
		color: #FF9800;
	}
	.vsText{
		font-size: 24rpx;
		color: #9B9B9B;
		margin-left: 10rpx;
	}
	.vs_more{
		color: #A8A8A8;
		font-size: 32rpx;
	}
</style>
